package org.crapola;

import org.crapola.model.battle.BattleInput;
import org.crapola.model.battle.BattleOutput;
import org.crapola.engine.battle.Battle;
import org.crapola.engine.battle.test.BattleTest;

/**
 * Civilian Research And Patrol Of Lifeform Activity (C.R.A.P.O.L.A.)
 * main class.  Launches the game.
 */
public class Main {
	public static void main(String[] args) {
		if (args.length < 1)
			throw new UsageException("java "+new Object(){}.getClass().getEnclosingClass().getName()+" <filename>");
		BattleInput input = BattleTest.debugReadInputFromFile(args[0]);
		BattleOutput output = new Battle(input).run();
		BattleTest.debugPrintOutput(output);
	}
}
